$def with (torrent, files)
<form action="/action/" method="post" enctype="multipart/form-data">
<table id="controls">
    <tr>
        <td><a href="/start/?hash=$torrent.hash" title="start">
            <img src="/static/images/go-next.png" alt="start">
        </a></td>
        <td><a href="/stop/?hash=$torrent.hash" title="stop">
            <img src="/static/images/media-record.png" alt="stop">
        </a></td>
        <td>
            URL:&nbsp; <input type="text" name="url" class="url"> &nbsp;or<br>
            <input type='file' name='ufile' class="file">
            
        </td>
        <td><input type='submit' name='add' value='' class="addurl"></td>
        <td><a href="/delete/?hash=$torrent.hash" title="delete">
            <img src="/static/images/list-remove.png" alt="delete">
        </a></td>
        <td><a href="/detail/$torrent.hash" title="refrash"><img src="/static/images/view-refresh.png" alt="refrash"></a></td>
        <td><a href="/settings/" title="settings"><img src="/static/images/preferences-system.png" alt="settings"></a></td>
    </tr>
</table>
</form>
<div id="views">
    <ul>
        <li class="active"><a href="/list/">All</a>
        <li><a href="/list/complete">Complite</a>
        <li><a href="/list/incomplete">Incomplite</a>
    </ul>
</div>
<div id="wraper">
    <div id="torrent">
        <div>Status: $:status_str(torrent.status)</div>
        <div>Name: $torrent</div>
        <div>Down/Size: $:human_size(torrent.completed_bytes)/$:human_size(torrent.size)
            $:processbar(torrent.completed_bytes, torrent.size)</div>
        <div>Seeders: $torrent.peers_complete ($torrent.peers_connected)</div>
        <div>Leechers: $:leechers(torrent.peers_connected, torrent.peers_complete)</div>
        <div>Down speed: $:human_size(torrent.down_rate)</div>
        <div>Up speed: $:human_size(torrent.up_rate)</div>
        <div>Ratio: $:ratio(torrent.ratio)</div>
        <div>Message: $torrent.message</div>
        <div><form action="/action/detail/$torrent.hash" method="post">
        Priority: 
        <select name="priority">$:priority_select(torrent.priority)</select> 
        <input type="submit" name="set_priority" value="Set">
        </form></div>
    </div>
<form action="/action/detail/$torrent.hash" method="post">
<table id="main">
    <tr>
        <th></th>
        <th>Name</th>
        <th>Size</th>
        <th>Priority</th>
    </tr>
    $:filelist(files)
    <tr>
    <td></td>
    <td></td>
    <td class="size"></td>
    <td><input type="submit" name="set_files_priority" value="Set"></td>
    </tr>
</table>
</form>
</form>
</div>
